package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;

/**
 * 销售实体
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_outorder")
public class OutOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 销售编号*/
    @TableId(value = "pk_outOrderId", type = IdType.AUTO)
    private Integer outOrderId;

    /** 销售日期*/
    @TableField("o_date")
//    private LocalDate date = LocalDate.now();
    private String date;

    /** 订单总额*/
    @TableField("o_totalPrice")
    private Integer totalPrice;

    /** 送货地址*/
    @TableField("o_address")
    private String address;

    /** 客户编号*/
    @TableField("fk_customId")
    private Integer customId;

    /** 销售员编号*/
    @TableField("fk_userId")
    private Integer userId;

    /** 客户对象*/
    @TableField(exist = false)
    private Custom custom;

    /** 销售员对象*/
    @TableField(exist = false)
    private  User user;

    /**销售详情集合*/
    @TableField(exist = false)
    private List<OutOrderInfo> outOrderInfoList;
}
